<template>
  <div class="item">
    <label for :style="'width: ' + labelWidth  + ';'">{{lableName}}</label>
    <div class="inline-block">
      <el-select
        v-model="tThis.formData[selectIdName]"
        :style="'width:' + selectWidth + ';'"
        :placeholder="selectPlaceholder ? selectPlaceholder : '请选择'"
        size="small"
        @change="changeF"
      >
        <el-option
          v-for="(item, index) in selectOpts"
          :key="index"
          :label="item.label"
          :value="item.value"
        ></el-option>
      </el-select>
    </div>
  </div>
</template>

<script>
export default {
  components: {},
  props: {
    lableName: {
      type: String,
    },
    selectIdName: {
      type: String,
    },
    selectOpts: {
      type: Array,
    },
    tThis: {
      type: Object,
    },
    selectPlaceholder: {
      type: String,
    },
    selectWidth: {
      type: String,
    },
    labelWidth: {
      type: String,
    },
  },
  data() {
    return {};
  },
  mounted() {
   
  },
  methods: {
    //改变
     changeF (e) {
      this.$emit("change", e);
    }
  },
};
</script>

<style lang="scss" scoped>
// @import '~styles/mixins.scss';
// @import '~styles/variables.scss';

.item {
  display: inline-block;
  margin-left: 20px;
  margin-bottom: 10px;
  label {
    display: inline-block;
    min-width: 60px;
    font-size: 14px;
    color: #263238;
    text-align: center;
  }
  .inline-block {
    display: inline-block;
    margin-left: 10px;
  }

  .input {
    width: 160px;
  }
}
</style>